﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using EntityObjects;
using BAL.Controller;

namespace PresentationLayer.View.DepartmentRepresentative
{
    public partial class Notification_DeptRep : System.Web.UI.UserControl
    {

        NotificationController nc = new NotificationController();
        List<Disbursement> disbursement;
        Employee employee=new Employee();

        protected void Page_Load(object sender, EventArgs e)
        {
            try
           {
               if (!IsPostBack)
               {
                   BindClerk();
               }
           }
           catch (Exception ex)
           {
               Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>alert('there is no requisition available for Approvel  or data base error!');</script>");

           }


       }
       protected void BindClerk()
       {  employee=(Employee)Session["CurrentUser"];
          int count = 0;
           string DeptId=employee.DeptId;
           disbursement = nc.selectDisbursementbyDeptId(DeptId);
           count=disbursement.Count();
           Noti_DeptRep.Text="New DisbursementList:  "+count;


       }
        }

        }
    
